from django.db import models
from django.conf import settings

class Language(models.Model):
    culture = models.CharField(max_length = 5)
    name    = models.CharField(max_length = 30)
    image   = models.ImageField(upload_to = 'core/language')    
    default = models.BooleanField(default = False)
    active  = models.BooleanField(default = True)
    def __unicode__(self):
        return self.name
    def list_image(self):
        return '<img src="%s%s"/>' % (settings.UPLOADS_URL, self.image)
    list_image.allow_tags = True
